// EcoModeler - C# Edition :: Version 9.16 build 3301
using System;
using System.ComponentModel;
using System.Collections;
using System.Collections.Generic;
using Eco.Services;
using Eco.ObjectRepresentation;
using Eco.ObjectImplementation;
using Eco.UmlRt;
using Eco.UmlCodeAttributes;
using Eco.Subscription;

namespace TTServer
{
	#region MM_ECO_Generated
	#region Attributes
	[UmlElement(Id="{cf0ceef7-84fb-4ba3-8015-6313fdda383c}")]
	#endregion

	#region Documentation
	//1 Organisation
	/// Basisklasse von Verein und Verband
	#endregion

	#endregion
	public abstract class Organisation: TTServerObject
	{
		#region MM_ECO AutoGenerated ECO code

		new public struct Eco_LoopbackIndices
		{
			public const int Eco_FirstMember = TTServer.TTServerObject.Eco_LoopbackIndices.Eco_MemberCount;
			public const int Eco_MemberCount = (Eco_FirstMember + 6);
			public const int Artikel_MemberIndex = Eco_FirstMember + 0;
			public const int Bemerkung_MemberIndex = Eco_FirstMember + 1;
			public const int Info_MemberIndex = Eco_FirstMember + 2;
			public const int Name_MemberIndex = Eco_FirstMember + 3;
			public const int Person_MemberIndex = Eco_FirstMember + 4;
			public const int Amt_MemberIndex = Eco_FirstMember + 5;
		}

		public IEcoList<Amt> Amt
		{
			get
			{
				return new ObjectListAdapter<Amt>((IList) (this.eco_Content.get_MemberByIndex(Eco_LoopbackIndices.Amt_MemberIndex)));
			}
		}
		#endregion

		#region MM_ECO Model owned attributes
		//Note: Do not remove any property within this region, nor change its signature

		#region MM_ECO_Generated
		#region Attributes
		[UmlElement(Index=(Organisation.Eco_LoopbackIndices.Bemerkung_MemberIndex), Id="{e9cb9968-a4b3-4fe6-82b3-37a89fdd1def}")]
		[UmlTaggedValue("Eco.Length", "10000")]
		#endregion

		#region Documentation
		//1 Bemerkung zu einer Halle
		/// Feld in dem man eine Bemerkung zu der Halle
		/// ablegen kann.
		#endregion

		#endregion
		public string Bemerkung
		{
			get
			{
				#region MM_ECO_Generated
				return (string) (this.eco_Content.get_MemberByIndex(Eco_LoopbackIndices.Bemerkung_MemberIndex));
				#endregion
			}
			set
			{
				#region MM_ECO_Generated
				this.eco_Content.set_MemberByIndex(Eco_LoopbackIndices.Bemerkung_MemberIndex, ((object)(value)));
				#endregion
			}
		}

		#region MM_ECO_Generated
		[UmlElement("AssociationEnd", Index=(Organisation.Eco_LoopbackIndices.Info_MemberIndex), Id="{6d0b749e-a3a3-4feb-a003-6f79c40e0d12}")]
		[UmlMetaAttribute("association", typeof(TTServerPackage.VerbandInfo), Index=1)]
		[UmlMetaAttribute("multiplicity", "0..*")]
		[UmlTaggedValue("Eco.Embed", "False")]
		#endregion
		public IEcoList<Info> Info
		{
			get
			{
				#region MM_ECO_Generated
				return new ObjectListAdapter<Info>((IList) (this.eco_Content.get_MemberByIndex(Eco_LoopbackIndices.Info_MemberIndex)));
				#endregion
			}
		}

		#region MM_ECO_Generated
		#region Attributes
		[UmlElement(Index=(Organisation.Eco_LoopbackIndices.Name_MemberIndex), Id="{6b19c5b6-470d-4064-8b7e-f097d16e5b48}")]
		[UmlTaggedValue("Eco.Length", "255")]
		#endregion

		#region Documentation
		//1 Name des Verbandes
		/// Name des Verbandes
		#endregion

		#endregion
		public string Name
		{
			get
			{
				#region MM_ECO_Generated
				return (string) (this.eco_Content.get_MemberByIndex(Eco_LoopbackIndices.Name_MemberIndex));
				#endregion
			}
			set
			{
				#region MM_ECO_Generated
				this.eco_Content.set_MemberByIndex(Eco_LoopbackIndices.Name_MemberIndex, ((object)(value)));
				#endregion
			}
		}

		#region MM_ECO_Generated
		[UmlElement("AssociationEnd", Index=(Organisation.Eco_LoopbackIndices.Person_MemberIndex), Id="{2b49fcd7-dc31-47d3-b4f3-f39f4a87b4e6}")]
		[UmlMetaAttribute("association", typeof(TTServerPackage.Amt), Index=1)]
		[UmlMetaAttribute("multiplicity", "0..*")]
		[UmlTaggedValue("Eco.Embed", "False")]
		#endregion
		public IEcoList<Person> Person
		{
			get
			{
				#region MM_ECO_Generated
				return new ObjectListAdapter<Person>((IList) (this.eco_Content.get_MemberByIndex(Eco_LoopbackIndices.Person_MemberIndex)));
				#endregion
			}
		}

		#region MM_ECO_Generated
		[UmlElement("AssociationEnd", Index=(Organisation.Eco_LoopbackIndices.Artikel_MemberIndex), Id="{210d8d4a-c9e9-434c-9ae0-d1af0c1f6578}")]
		[UmlMetaAttribute("association", typeof(TTServerPackage.ArtikelOrganisation), Index=0)]
		[UmlMetaAttribute("multiplicity", "0..*")]
		[UmlTaggedValue("Eco.Embed", "False")]
		#endregion
		public IEcoList<Artikel> Artikel
		{
			get
			{
				#region MM_ECO_Generated
				return new ObjectListAdapter<Artikel>((IList) (this.eco_Content.get_MemberByIndex(Eco_LoopbackIndices.Artikel_MemberIndex)));
				#endregion
			}
		}
		#endregion

		#region MM_ECO Model owned methods
		//Note: Do not remove any method within this region, nor change its signature

		public Organisation(IContent content) : base(content)
		{
			#region MM_ECO_Generated
			#endregion
		}

		public Organisation(IEcoServiceProvider serviceProvider) : base(serviceProvider)
		{
			try
			{
				// Place user code ONLY here
			}
			catch (System.Exception)
			{
				this.Deinitialize(serviceProvider);
				throw;
			}
		}
		#endregion
	}
}
